﻿using System.IO;
using Styx;
using Styx.Helpers;
using System.ComponentModel;
using DefaultValue = Styx.Helpers.DefaultValueAttribute;
using Styx.Common;
using Styx.Common.Helpers;

namespace KingWoW
{
    public class ArcaneMageSettings : Settings
    {
        public static ArcaneMageSettings Instance = new ArcaneMageSettings();

        public ArcaneMageSettings()
            : base(Path.Combine(Styx.Common.Utilities.AssemblyDirectory, string.Format(@"CustomClasses/ArcaneMageConfig/ArcaneMage-Settings-{0}.xml", StyxWoW.Me.Name)))
        {
        }

        [Setting]
        [DefaultValue(28)]
        [Category("Settings PULL")]
        [DisplayName("PullDistance")]
        [Description("Distance to pull from")]
        public float PullDistance { get; set; }

        public enum ArmorType
        {
            FROST,
            MOLTEN,
            MAGE
        }

        [Setting]
        [DefaultValue(ArmorType.MAGE)]
        [Category("Settings BUFF")]
        [DisplayName("Use Armor")]
        [Description("chose armor to use")]
        public ArmorType ArmorToUse { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings BUFF")]
        [DisplayName("Autobuff brillance")]
        [Description("chose if buff arcane brillance automatic or manual")]
        public bool AutoBuffBrillance { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings BUFF")]
        [DisplayName("IceWardOnTank")]
        [Description("chose if automatically cast Ice ward on Tank")]
        public bool IceWardOnTank { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings BUFF")]
        [DisplayName("UseIcebarrier")]
        [Description("chose if automatically cast Ice barrier on cooldown")]
        public bool UseIcebarrier { get; set; }   

        [Setting]
        [DefaultValue(50)]
        [Category("Settings REST")]
        [DisplayName("Drink mana%")]
        [Description("Drink at % mana")]
        public int ManaPercent { get; set; }

        [Setting]
        [DefaultValue(50)]
        [Category("Settings REST")]
        [DisplayName("Eat hp%")]
        [Description("Eat at % hp")]
        public int HealthPercent { get; set; }

        [Setting]
        [DefaultValue(4)]
        [Category("Settings AOE")]
        [DisplayName("AOE on #mobs")]
        [Description("use AOE spells if mobs number >= this value")]
        public int AOECount { get; set; }

        public enum CDUseType
        {
            COOLDOWN,
            BOSS,
            MANUAL
        }

        [Setting]
        [DefaultValue(CDUseType.COOLDOWN)]
        [Category("Settings CD")]
        [DisplayName("Use ArcanePower CD on")]
        [Description("Chose when use ArcanePower CD")]
        public CDUseType CDUseArcanePower { get; set; }

        [Setting]
        [DefaultValue(CDUseType.COOLDOWN)]
        [Category("Settings CD")]
        [DisplayName("Use Mirror Image CD on")]
        [Description("Chose when use your Mirror Image CD")]
        public CDUseType CDUseMirrorImage { get; set; }

        [Setting]
        [DefaultValue(CDUseType.COOLDOWN)]
        [Category("Settings CD")]
        [DisplayName("Use Alter Time CD on")]
        [Description("Chose when use your AlterTime CD")]
        public CDUseType CDUseAlterTime { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings CC")]
        [DisplayName("Use Deep Freeze")]
        [Description("Chose to enable/disable Deep Freeze")]
        public bool UseDeepFreeze { get; set; }

        [Setting]
        [DefaultValue(false)]
        [Category("Settings SPECIAL")]
        [DisplayName("Use Blink")]
        [Description("Chose to enable/disable automatic Blink")]
        public bool UseBlink { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("Use RuneOfPower")]
        [Description("Chose to enable/disable if talented RuneOfPower")]
        public bool UseRuneOfPower { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("UseIncenterWardOnCD")]
        [Description("Chose to enable/disable if talented Incanter Ward on CD")]
        public bool UseIncenterWardOnCD { get; set; }
        

        [Setting]
        [DefaultValue(true)]
        [Category("Settings SPECIAL")]
        [DisplayName("Use Fire Blast")]
        [Description("Chose to Fire Blast id glyphed to explode bomb")]
        public bool UseFireBlast { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings ROTATION")]
        [DisplayName("MissilesOnlyAtMaxCharge")]
        [Description("cast arcane missiles only at 6 charge")]
        public bool MissilesOnlyAtMaxCharge { get; set; }

        [Setting]
        [DefaultValue(true)]
        [Category("Settings ROTATION")]
        [DisplayName("Use Scorch in rotation")]
        [Description("Use Scorch in rotation")]
        public bool UseScorchInRotation { get; set; }

        [Setting]
        [DefaultValue(90)]
        [Category("Settings ROTATION")]
        [DisplayName("Scorch if mana lower than")]
        [Description("Use Scorch if mana lower than this value")]
        public int ScorchMana { get; set; }
        
        

        [Setting]
        [DefaultValue(85)]
        [Category("Settings MANA")]
        [DisplayName("Mana Gem at mana %")]
        [Description("Use Mana Gem if your mana % lower tan this value")]
        public int UseManaGemPercent { get; set; }

        [Setting]
        [DefaultValue(30)]
        [Category("Settings MANA")]
        [DisplayName("Mana Evocation at mana %")]
        [Description("Use Evocation if your mana % lower than this value")]
        public int UseEvocationPercent { get; set; }

        [Setting]
        [DefaultValue(0)]
        [Category("Settings MANA")]
        [DisplayName("BarrageAtMana %")]
        [Description("Cast Barrage at 6 charge if your mana % lower than this value in sigle target or in AOE situations If this value is set 100 or above cc will cast always at 6 charge ")]
        public int BarrageAtMana { get; set; }
        
        

    }
}
